<script>
	export default {
		onLaunch: function() {
      uni.login({
        success(res) {
          uni.request({
            url: '',
            method: 'GET',
            data: {
              code: res.code
            },
            success(res) {
              uni.setStorageSync('token',res.data.data.token)
            },
            fail() {
              console.log('login error')
            }
          })
        }
      })
		},
		onShow: function() {
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
  @import "@/uni_modules/uview-ui/index.scss";
	@import '@/uni_modules/uni-scss/index.scss';
	/* #ifndef APP-NVUE */
	@import '@/static/customicons.css';
  @import '@/static/iconfont/iconfont.css';
	// 设置整个项目的背景色
	page {
		// background-color: #FCFCF0; FCFCFA
    background-image: linear-gradient(to bottom , #FCFCF0, #FCFCFA);
	}

	/* #endif */
	.example-info {
		font-size: 14px;
		color: #333;
		padding: 10px;
	}
  .nullimage {
    height: 100%;
    display: flex;
    flex-direction: column;
    // justify-content: center;
    align-items: center;
    padding: 50% 0;
    text {
      font-size: 14px;
      color: #A5A5A5;
    }
    image {
      width: 160rpx;
      height: 120rpx;
    }
  }
  
  .uniui-locked {
    font-size: 22px !important;
  }
  .uniui-person {
    font-size: 22px !important;
  }
</style>
